package controllers

import (
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/mvc"
)


type MyController struct{
	Ctx iris.Context
}

// 再添加路由

//func (m *MyController) BeforeActivation(b mvc.BeforeActivation) {
//	b.Handle("GET", "/something/{id:long}", "MyCustomHandler", hello) // method,path,funcName,middleware
//}

//func (m *MyController) Get() string {
//	return "Hello World"
//}

//func (m *MyController) MyCustomHandler(id int64) string {
//	return "MyCustomHandler"
//}

//func hello(ctx iris.Context) {
//	fmt.Println("ctx")
//	ctx.Next()
//}

func (m *MyController)Get() mvc.View {

	myView := mvc.View{
		Name: "test.html",
	}
	return myView
}
